<?php



/**
 * This class defines the structure of the 'customer' table.
 *
 *
 *
 * This map class is used by Propel to do runtime db structure discovery.
 * For example, the createSelectSql() method checks the type of a given column used in an
 * ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
 * (i.e. if it's a text column type).
 *
 * @package    propel.generator.ise-php.map
 */
class CustomerTableMap extends TableMap
{

	/**
	 * The (dot-path) name of this class
	 */
	const CLASS_NAME = 'ise-php.map.CustomerTableMap';

	/**
	 * Initialize the table attributes, columns and validators
	 * Relations are not initialized by this method since they are lazy loaded
	 *
	 * @return     void
	 * @throws     PropelException
	 */
	public function initialize()
	{
		// attributes
		$this->setName('customer');
		$this->setPhpName('Customer');
		$this->setClassname('Customer');
		$this->setPackage('ise-php');
		$this->setUseIdGenerator(false);
		// columns
		$this->addForeignPrimaryKey('PERSONID', 'Personid', 'INTEGER' , 'person', 'PERSONID', true, 10, 0);
		$this->addColumn('CCNR', 'Ccnr', 'VARCHAR', false, 16, null);
		$this->addColumn('IBAN', 'Iban', 'VARCHAR', false, 34, null);
		$this->addColumn('BIC', 'Bic', 'VARCHAR', false, 11, null);
		$this->addColumn('PREMIUM', 'Premium', 'BOOLEAN', false, 1, false);
		// validators
	} // initialize()

	/**
	 * Build the RelationMap objects for this table relationships
	 */
	public function buildRelations()
	{
		$this->addRelation('Person', 'Person', RelationMap::MANY_TO_ONE, array('personid' => 'personid', ), 'CASCADE', 'CASCADE');
		$this->addRelation('Reservation', 'Reservation', RelationMap::ONE_TO_MANY, array('personid' => 'customerid', ), null, null, 'Reservations');
		$this->addRelation('Webuser', 'Webuser', RelationMap::ONE_TO_ONE, array('personid' => 'personid', ), 'CASCADE', 'CASCADE');
	} // buildRelations()

} // CustomerTableMap
